package be.vsko.zelfevaluatie.help;

import java.util.HashMap;

public class QueryParameters {
	private int limit;
	private int offset;
	private String orderBy;
	private String orderByDefault;
	private boolean descending;
	private HashMap<String, String> filters = new HashMap<String, String>();
	
	public QueryParameters() {
		super();
	}
	
	public QueryParameters(int limit, int offset, String orderBy,
			String orderByDefault, boolean descending) {
		super();
		this.limit = limit;
		this.offset = offset;
		this.orderBy = orderBy;
		this.orderByDefault = orderByDefault;
		this.descending = descending;
	}

	public int getLimit() {
		return limit;
	}

	public QueryParameters setLimit(int limit) {
		this.limit = limit;
		return this;
	}

	public int getOffset() {
		return offset;
	}

	public QueryParameters setOffset(int offset) {
		this.offset = offset;
		return this;
	}

	public String getOrderBy() {
		return orderBy;
	}

	public QueryParameters setOrderBy(String orderBy) {
		this.orderBy = orderBy;
		return this;
	}

	public String getOrderByDefault() {
		return orderByDefault;
	}

	public QueryParameters setOrderByDefault(String orderByDefault) {
		this.orderByDefault = orderByDefault;
		return this;
	}

	public boolean isDescending() {
		return descending;
	}

	public QueryParameters setDescending(boolean descending) {
		this.descending = descending;
		return this;
	}

	public HashMap<String, String> getFilters() {
		return filters;
	}
	
	public QueryParameters addFilter(String key, String value) {
		filters.put(key, value);
		return this;
	}

	public QueryParameters setFilters(HashMap<String, String> filters) {
		this.filters = filters;
		return this;
	}	
}
